package com.hourses.controller;

import com.hourses.pojo.Result;
import com.hourses.service.impl.StoreServiceImpl;
import com.hourses.vo.StatisticsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:
 * @Author:LiTao
 * @Date:2025/5/11 14:05
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController {
    //向前端ECharts框架传送图形中展示的数据
    @Autowired
    private StoreServiceImpl storeService;
    @GetMapping("/store-invent")
    public Result echartsData(){
        List<StatisticsVo> statisticsVos = storeService.selectEChartsData();
        return Result.ok(statisticsVos);
    }
}
